﻿#if WINDOWS_PHONE
#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2010-12-09 21:03:34Z</CreationDate>
</File>
*/
#endregion

using System;

using Microsoft.Phone.Tasks;

namespace Outcoder.LauncherModel.Launchers
{
	/* TODO: [DV] Comment. */
	public class PhotoChooserAdapter : IPhotoChooserLauncher
	{
		readonly PhotoChooserTask task = new PhotoChooserTask();

		public void Show()
		{
			task.Show();
		}

		public event EventHandler<PhotoResultBase> Completed
		{
			add
			{
				task.Completed += (sender, args) => value(sender, new PhotoResultAdapter(args));
			}
			remove
			{
				throw new NotSupportedException("Unsubscription is not supported.");
			}
		}

		public int PixelHeight
		{
			get
			{
				return task.PixelHeight;
			}
			set
			{
				task.PixelHeight = value;
			}
		}

		public int PixelWidth
		{
			get
			{
				return task.PixelWidth;
			}
			set
			{
				task.PixelWidth = value;
			}
		}

		public bool ShowCamera
		{
			get
			{
				return task.ShowCamera;
			}
			set
			{
				task.ShowCamera = value;
			}
		}
	}
}
#endif